import random
diannao = ['石头','剪刀','布']
computer = random.choice(diannao)
jinbi = 50
while 100 > jinbi > 0:
    jinbi -= 5
    user = input("请出拳（石头|剪刀|布）：")
    print("你出的的是：%s，电脑出的是：%s" %(user,computer))
    if user == computer:
        print("平局！")
        print("-" * 20)
    elif (user == "石头" and computer == "剪刀") or (user == "剪刀" and computer == "布") or (user == "布" and computer == "石头"):
        print("你赢了！")
        print("-" * 20)
        jinbi += 10
    else:
        print("你输了！")
        print("-" * 20)
        jinbi -= 5
    if jinbi == 100:
        print("-" * 20)
        print("累计金币达到%d，你赢啦"%jinbi)
    elif jinbi <= 0:
        print("-" * 20)
        print("你当前金币数为：%d个，金币不足，不能接着出拳了"%jinbi)
